home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sea_crane.cog < prev    next >
Text File  |  1999-11-15  |  17KB  |  681 lines

  1. # Jones 3D Cog Script
  2. #
  3. # sea_crane.cog
  4. #
  5. # [DS & revised by HB]
  6. #
  7. #
  8. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  9. #
  10. # ==============================================================================
  11.  
  12. symbols
  13.  
  14.     message        startup
  15.     message        activated
  16.     message        entered
  17.     message        exited
  18.     message        blocked
  19.     message        pulse
  20.  
  21.     sound        in_nope0=inxj098.wav                    local # It won't budge.
  22.     sound        in_nope1=inxj060.wav                    local # Dont think thats right answer.
  23.     sound        in_nope2=inxj061.wav                    local # Not sure good idea.
  24.     sound        in_didit=Inxj112.wav                    local # That ought to do it.
  25.  
  26.     sound        jewel0=se03j01.wav                    local
  27.     sound        jewel1=se03j02.wav                    local
  28.     int        noticed=0                            local
  29.  
  30.     sound        bridge_snd=nub_elev_move_c.wav            local
  31.     sound        bridge_stop=nub_elev_stopecho_c.wav            local
  32.     sound        crane_start=sea_crane_start_c.wav            local
  33.     sound        crane_snd=sea_crane_move_c.wav            local
  34.     sound        crane_stop=sea_crane_stop_c.wav            local
  35.     sound        hook_start=sea_hook_start_c.wav            local
  36.     sound        hook_snd=sea_hook_move_c.wav                local
  37.     sound        hook_stop=sea_hook_stop_c.wav                local
  38.     thing        player                            local
  39.     thing        crane
  40.     thing        bridge
  41.     thing        hook
  42.     thing        switch0
  43.     thing     switch1
  44.     thing     switch2
  45.     thing        jewelcrate
  46.     thing        landing_crate
  47.     thing        plasma
  48.     thing        campos0                                    nolink
  49.     thing        campos1                                    nolink
  50.     thing        inviso_truck                            nolink
  51.     thing        crane_ct_1                                nolink
  52.     cog            hintcog
  53.     surface        pad
  54.     surface        control
  55.     material    mat0=gen_4aplasma_jewel.mat    local       # animating plasma texture
  56.     vector        vecX                                local
  57.     vector        vecXneg                            local
  58.     vector        vecY                                local
  59.     vector        vecYneg                            local
  60.     vector        vecZ                                local
  61.     vector        vecZneg                            local
  62.     vector        hookvec                            local
  63.     flex        sleeptime                                local
  64.     flex        endcam1                                    local # label
  65.     flex        endcam2                                    local # label
  66.     flex        cratesize                                    local
  67.     int            active=0                                local
  68.     int            boommove=0                                local
  69.     int            bridemove=0                                local
  70.     int            hookmove=0                                local
  71.     int            brgdist=0                                local
  72.     int            crndist=0                                local
  73.     int            hookdown=0                                local
  74.     int            stopsnd                                    local
  75.     int            jewelattach=0                            local
  76.     int            lifted=0                                local
  77.     int            curcam                                    local
  78.     int            mechasnd                                local
  79.     int            startsnd                                local
  80.     int            bridgeshot                                local
  81.     int            pulseon                                    local
  82.     int            prevswitch=0                            local # activate workaround [HB]
  83.     int            hookMoved=0                                local
  84.             
  85. #---------lighting effect-----------------------
  86.  
  87.     thing        lightpos
  88.     
  89.     vector        vecMinLight                                local
  90.     vector        vecWhtLight                                local
  91.     vector        vecMaxRedLt                                local
  92.  
  93.     float        period=1.5                                local    
  94.     float        LightR=0.8                                local    
  95.     float        LightG=0.8                                local
  96.     float        LightB=0.9                                local
  97.  
  98.     float        maxRedLightR=1.0                        local    
  99.     float        maxRedLightG=0.0                        local
  100.     float        maxRedLightB=0.0                        local
  101.  
  102.     float        minLightR=0.0                            local
  103.     float        minLightG=0.0                            local
  104.     float        minLightB=0.0                            local
  105.  
  106.     float        minRadius=0.1                            local
  107.     float        maxRadius=2.0                            local
  108.  
  109.     float        hookZ                                    local
  110. #-----polyline and endpoints---------------
  111.  
  112.     thing        beam0                                    local
  113.     thing        beam1                                    local
  114.     thing        st_beam0                                nolink
  115.     thing        st_beam1                                nolink
  116.     thing        endbeam0                                nolink
  117.     thing        endbeam1                                nolink
  118.  
  119.     material    cablemat=fhead_rope_sde.mat                local
  120.     int        lightnum                            local
  121.  
  122. end
  123.  
  124. #-------------------------------------------------------------------------------
  125.  
  126. code
  127.  
  128. # ..............................................................................
  129.  
  130. startup:
  131.  
  132.     player = GetLocalPlayerThing();
  133.     vecMinLight = VectorSet(minLightR, minLightG, minLightB);
  134.     vecWhtLight = VectorSet(LightR, LightG, LightB);
  135.     vecMaxRedLt = VectorSet(maxRedLightR, maxRedLightG, maxRedLightB);
  136.     vecX = VectorSet(1.0, 0.0, 0.0);
  137.     vecXneg = VectorSet(-1.0, 0.0, 0.0);
  138.     vecY = VectorSet(0.0, 1.0, 0.0);
  139.     vecYneg = VectorSet(0.0,-1.0, 0.0);
  140.     vecZ = VectorSet(0.0, 0.0, 1.0);
  141.     vecZneg = VectorSet(0.0, 0.0,-1.0);
  142.     SetThingLight(lightpos, vecWhtLight, maxRadius, 0.2);
  143.     beam0 = CreatePolylineThing(st_beam0, endbeam0, '0 0 0', cablemat, .002, .002, 0);
  144.     beam1 = CreatePolylineThing(st_beam1, endbeam1, '0 0 0', cablemat, .002, .002, 0);
  145.     CaptureThing(beam0);
  146.     CaptureThing(beam1);
  147.     AttachThingToThing(endbeam0, hook);
  148.     AttachThingToThing(endbeam1, hook);
  149.     AttachThingToThing(beam0, crane);
  150.     AttachThingToThing(beam1, crane);
  151.     MaterialAnim(mat0, 9.0, 1);
  152.     AttachThingToThing(crane_ct_1, bridge); # glue cam target to bridge
  153.     cratesize=GetThingCollideSize(jewelcrate);
  154.  
  155.     hookVec = GetThingPos(hook);
  156.     hookZ = VectorZ(hookvec);
  157.  
  158.     return;
  159.  
  160. # ..............................................................................
  161.  
  162. activated:
  163.     if(GetSenderRef() == pad) return;                # Player on jewel pad area.
  164.     if(GetSenderRef() == jewelcrate)
  165.     {
  166.         MakeMeStop();
  167.         DeselectWeaponWait(player);
  168.         StartCutscene(0);
  169.  
  170.     # ----- Set Cam Offset ---------
  171.     if (Rand() < 0.5)
  172.     {
  173.         SetExtCamOffset('0.15 -0.05 0.04');
  174.     }
  175.     else
  176.     {
  177.         SetExtCamOffset('-0.15 -0.05 0.04');
  178.     }
  179.     SetExtCamLookOffset('0.0 0.02 0.0');
  180.  
  181.         if(noticed == 1)
  182.         {
  183.         PlayVoice(player, jewel1, 1.0, 1);
  184.         }
  185.         if(noticed == 0)
  186.         {
  187.         PlayVoice(player, jewel0, 1.0, 1);
  188.         noticed=1;
  189.         }
  190.  
  191.     # ----- Reset Camera ----------
  192.     RestoreExtCam();
  193.         EndCutscene();
  194.         ClearActorFlags(player, 0x200000);
  195.         return;
  196.     }
  197.     if (active == 1)
  198.     {
  199.         return;
  200.     }
  201.     active = 1;
  202.     MakeMeStop();
  203.     DeselectWeaponWait(player);
  204.     StartCutscene(1);
  205.     PlayMode(player, 60, 0);
  206.  
  207.     # Don't check for Indy moving during activation...
  208.     SetPulse(0.0);
  209.     pulseon = 0;
  210.  
  211.     Sleep(0.2); # so activate gesture works
  212.  
  213.     #-------------------------------Move Bridge---------------------------------
  214.  
  215.     if (GetSenderRef() == switch0 || prevswitch == 10)
  216.     {
  217.         # This stupid workaround forces switch re-activation when Indy hasn't moved... [HB]
  218.         prevswitch = 10;
  219.  
  220.         if ((hookdown == 1) || (jewelattach == 1))
  221.         {
  222.             PlayVoice(player, in_nope0, 1.0, 1);
  223.             goto endcam1;
  224.             return;
  225.         }
  226.  
  227.         MovetoFrame(switch0, 1, 1);
  228.         WaitForStop(switch0);
  229.  
  230.         # Substitute cam 2 for cam 1...
  231.         if (bridgeshot == 0)
  232.         {
  233.             SetCameraLookInterp(2, 0);
  234.             SetCameraFocus(2, campos0);
  235.             SetCameraSecondaryFocus(2, crane_ct_1);
  236.             SetCurrentCamera(2);
  237.             SetCameraFOV(110, 1, 1.0);
  238.             bridgeshot = 1;
  239.         }
  240.         
  241.         SetThingLight(lightpos, vecMinLight, maxRadius, 0.2);
  242.         lightnum = ThingLightAnim(lightpos, vecMinLight, minRadius, vecMaxRedLt, maxRadius, period);
  243.         mechasnd = PlaySoundThing(bridge_snd, bridge, 1, 10, 30, 1);
  244.  
  245.         if (brgdist >= 8)
  246.         {
  247.             brgdist = 0;
  248.         }
  249.  
  250.         if (brgdist <= 3)
  251.         {
  252.             MoveThing(bridge, VecXneg, 0.2, 2.0);
  253.             MoveThing(crane, VecXneg, 0.2, 2.0);
  254.             MoveThing(hook, VecXneg, 0.2, 2.0);
  255.             brgdist = (brgdist + 1);
  256.             Sleep(2.0);
  257.             MovetoFrame(switch0, 0, 1.0);
  258.             stopsnd = 0;
  259.  
  260.             sleeptime = 0.2;
  261.             goto endcam2;
  262.         }
  263.  
  264.         if (brgdist >= 4)
  265.         {
  266.             MoveThing(bridge, VecX, 0.2, 2.0);
  267.             MoveThing(crane, VecX, 0.2, 2.0);
  268.             MoveThing(hook, VecX, 0.2, 2.0);
  269.             brgdist = (brgdist + 1);
  270.             Sleep(2.0);
  271.             MovetoFrame(switch0, 0, 1.0);
  272.             stopsnd = 0;
  273.             
  274.             sleeptime = 0.2;
  275.             goto endcam2;
  276.         }
  277.     }
  278.  
  279.     #-------------------------------Move Crane----------------------------------
  280.     
  281.     if (GetSenderRef() == switch1 || prevswitch == 11)
  282.     {        
  283.         prevswitch = 11; # workaround forces switch to re-activate when Indy hasn't moved [HB]
  284.         
  285.         if ((hookdown == 1) || (jewelattach == 1))
  286.         {
  287.             PlayVoice(player, in_nope0, 1.0, 1);
  288.             goto endcam1;
  289.             return;
  290.         }
  291.  
  292.         MovetoFrame(switch1, 1, 1);
  293.         waitforstop(switch1);
  294.         
  295.         # Substitute cam 2 for cam 1...
  296.         if (bridgeshot == 0)
  297.         {
  298.             SetCameraLookInterp(2, 0);
  299.             SetCameraFocus(2, campos0);
  300.             SetCameraSecondaryFocus(2, crane_ct_1);
  301.             SetCurrentCamera(2);
  302.             SetCameraFOV(110, 1, 1.0);
  303.             bridgeshot = 1;
  304.         }
  305.         
  306.         SetThingLight(lightpos, vecMinLight, maxRadius, 0.2);
  307.         lightnum = ThingLightAnim(lightpos, vecMinLight, minRadius, vecMaxRedLt, maxRadius, period);
  308.         mechasnd = PlaySoundThing(crane_snd, crane, 1.0, 10, 30, 1);
  309.         if (crndist >= 12)
  310.         {
  311.             crndist=0;
  312.         }
  313.         if (crndist >= 6)
  314.         {
  315.             MoveThing(crane, vecYneg, 0.15, 2.0);
  316.             MoveThing(hook, vecYneg, 0.15, 2.0);
  317.             crndist= (crndist)+1;
  318.             Sleep(2.0);
  319.             MovetoFrame(switch1, 0, 1);
  320.             stopsnd = 1;
  321.             sleeptime = 0.2;
  322.             goto endcam2;
  323.         }
  324.         if (crndist <= 5)
  325.         {
  326.             MoveThing(crane, vecY, 0.15, 2.0);
  327.             MoveThing(hook, vecY, 0.15, 2.0);
  328.             crndist= (crndist)+1;
  329.             Sleep(2.0);
  330.             MovetoFrame(switch1, 0, 1);
  331.             stopsnd = 1;
  332.             sleeptime = 0.2;
  333.             goto endcam2;
  334.         }
  335.     }
  336.  
  337.     #-------------------------------Move Hook-----------------------------------
  338.     
  339.     if (GetSenderRef() == switch2 || prevswitch == 12)
  340.     {    
  341.         prevswitch = 12; # workaround forces switch to re-activate when Indy hasn't moved [HB]
  342.  
  343.         if (lifted == 1)
  344.         {
  345.             PlayVoice(player, in_nope2, 1.0, 1);
  346.             goto endcam1;
  347.             return;
  348.         }
  349.  
  350.         if ((brgdist == 2) || (brgdist == 6))
  351.         {
  352.             if ((crndist == 5) || (crndist == 7))
  353.             {
  354.                 # Position set to attach jewel crate...
  355.                 jewelattach=1;
  356.             }
  357.         }
  358.                     
  359.         if (jewelattach == 0)
  360.         {        
  361.             if (bridgeshot == 0)
  362.             {
  363.                 # Do standard wide angle...
  364.                 SetCameraLookInterp(2, 0);
  365.                 SetCameraFocus(2, campos0);
  366.                 SetCameraSecondaryFocus(2, crane_ct_1);
  367.                 SetCurrentCamera(2);
  368.                 SetCameraFOV(110, 1, 1.0);
  369.                 bridgeshot = 1;
  370.             }
  371.         }
  372.         else
  373.         {    
  374.             # Cut to shot of hook attaching to jewel crate...                    
  375.             SetCameraLookInterp(2, 0);
  376.             SetCameraPosInterp(2, 0);
  377.             SetCameraFocus(2, campos1);
  378.             SetCameraSecondaryFocus(2, hook);
  379.             SetCurrentCamera(2);
  380.             SetCameraFOV(90, 0, 0.0);
  381.             Sleep(0.01);
  382.             SetCameraFOV(80, 1, 4.0);
  383.         }
  384.     
  385.         MovetoFrame(switch2, 1, 1);
  386.         waitforstop(switch2);
  387.  
  388.         # Lower hook if it's in the up position...
  389.         if (hookdown == 0)
  390.         {
  391.             hookvec = GetThingPos(hook);
  392.             hookvec = VectorSet(VectorX(hookVec), VectorY(hookVec), hookZ);
  393.             SetThingLight(lightpos, vecMinLight, maxRadius, 0.2);
  394.             lightnum = ThingLightAnim(lightpos, vecMinLight, minRadius, vecMaxRedLt, maxRadius, period);
  395.             startsnd=PlaySoundThing(hook_start, hook, 1.0, 10, 30, 0);
  396.             waitforsound(startsnd);
  397.  
  398.             hookMoved = 0;
  399.  
  400.         #===================================================================
  401.         # To handle geometry collision problem.
  402.         #===================================================================
  403.              if((brgdist == 0) || (brgdist == 8) || (crndist <= 1) || (crndist == 6) || (crndist >= 11))
  404.             {
  405.                 // Hook is above upper platform.
  406.                 MoveThing(hook, vecZneg, 0.220, 2.0);
  407.                 hookMoved = 1;
  408.             }
  409.             else
  410.             {
  411.  
  412.         #===================================================================
  413.         # To handle 3do collision problem.
  414.         #===================================================================
  415.                 if((brgdist == 1) || (brgdist == 7))
  416.                 {
  417.                     if((crndist == 5) || (crndist == 7))
  418.                     {
  419.                         // Hook is above crates.
  420.                         MoveThing(hook, vecZneg, 0.415, 4.0);
  421.                         hookMoved = 1;
  422.                     }
  423.                     if ((crndist == 2) || (crndist == 10))
  424.                     {
  425.                         // Hook is above the truck.
  426.                         MoveThing(hook, vecZneg, 0.515, 4.0);
  427.                         hookMoved = 1;
  428.                     }
  429.                 }
  430.  
  431.         #===================================================================
  432.         # To handle Jewel Crate collision.
  433.         #===================================================================
  434.                 if ((brgdist == 2) || (brgdist == 6))
  435.                 {
  436.                     if ((crndist == 5) || (crndist == 7))
  437.                     {
  438.                         MoveThing(hook, vecZneg, 0.615, 4.0);
  439.                         hookMoved = 1;
  440.                     }
  441.                     if ((crndist == 2) || (crndist == 10))
  442.                     {
  443.                         MoveThing(hook, vecZneg, 0.625, 4.0);
  444.                         hookMoved = 1;
  445.                     }
  446.                 }
  447.             }
  448.  
  449.             if (!hookMoved)
  450.             {
  451.                 // Hook isn't above anything.
  452.                 MoveThing(hook, vecZneg, 0.815, 4.0);
  453.             }
  454.  
  455.             PlaySoundThing(hook_snd, hook, 1.0, 10, 30, 0);
  456.             hookdown = 1;
  457.  
  458.         #===================================================================
  459.         # Attaching To Jewel Crate.
  460.         #===================================================================
  461.  
  462.             if (jewelattach == 1)
  463.             {
  464.                 SendMessageEx(hintcog, user2, 1, 0, 0, 0); # param0=1; crate attach
  465.                 
  466.                 Sleep(4.0);
  467.                 MovetoFrame(switch2, 0, 1);
  468.                 PlaySoundThing(bridge_stop, jewelcrate, 1, 10, 30, 0);
  469.                 Sleep(1.0);
  470.                 AttachThingToThing(jewelcrate, hook);
  471.                 
  472.                 # Back to follow-cam...
  473.                 SetCameraFOV(90, 0, 0.0); # camera 2
  474.                 SetCurrentCamera(1);        
  475.                 ResetCameraFOV(0, 0.0);
  476.                 bridgeshot = 0;
  477.                 SetPulse(0.0);
  478.                 pulseon = 0;
  479.  
  480.                 goto endcam1;
  481.  
  482.                 return;
  483.             }
  484.         
  485.             goto endcam1;
  486.  
  487.             return;
  488.         }
  489.  
  490.         if (hookdown == 1)
  491.         {
  492.             # Cut to camera2 coverage...
  493.             if (jewelattach == 0)
  494.             {    
  495.                 # No special camera coverage when crate is not attached to hook...
  496.                 if (bridgeshot == 0)
  497.                 {
  498.                     SetCameraLookInterp(2, 0);
  499.                     SetCameraPosInterp(2, 0);
  500.                     SetCameraFocus(2, campos0);
  501.                     SetCameraSecondaryFocus(2, crane_ct_1);
  502.                     SetCurrentCamera(2);
  503.                     SetCameraFOV(110, 1, 1.0);
  504.                     bridgeshot = 1;
  505.                 }
  506.             }
  507.             else
  508.             {
  509.                 # Pay attention if jewel crate is attached...
  510.                 SetCameraLookInterp(2, 0);
  511.                 SetCameraPosInterp(2, 0);
  512.                 SetCameraFocus(2, campos1);
  513.                 SetCameraSecondaryFocus(2, hook);
  514.                 SetCameraFOV(90, 0, 0.0);
  515.                 Sleep(0.01);
  516.                 SetCameraFOV(80, 1, 2.0);                
  517.             }
  518.  
  519.             startsnd=PlaySoundThing(hook_start, hook, 1.0, 10, 30, 0);
  520.             WaitForSound(startsnd);
  521.             MoveThingToPos(hook, hookvec, 4.0);
  522.             PlaySoundThing(hook_snd, hook, 1.0, 10, 30, 0);
  523.             hookdown = 0;
  524.             Sleep(2.5);
  525.  
  526.             if (jewelattach == 1)
  527.             {
  528.                 SetCameraFOV(100, 1, 1.5);
  529.             }
  530.             Sleep(1.5);
  531.  
  532.             MovetoFrame(switch2, 0, 1);
  533.  
  534.             if (jewelattach == 1)
  535.             {
  536.                 SendMessageEx(hintcog, user2, 2, 0, 0, 0); # param0=2; crate up
  537.                 lifted = 1;
  538.                 PlaySoundThing(bridge_stop, jewelcrate, 1, 10, 30, 0); 
  539.                 StopAnim(lightnum);
  540.                 SetThingLight(lightpos, vecWhtLight, maxRadius, 0.5);
  541.                 Sleep(1.0);
  542.  
  543.                 # Back to follow-cam...
  544.                 SetCameraFOV(90, 0, 0.0); # camera 2
  545.                 SetCurrentCamera(1);        
  546.                 ResetCameraFOV(0, 0.0);
  547.                 bridgeshot = 0;
  548.                 SetPulse(0.0);
  549.                 pulseon = 0;
  550.                 Sleep(0.5);
  551.                 
  552.                 PlayVoice(player, in_didit, 1.0, 1);
  553.                 goto endcam1;
  554.             }
  555.             else
  556.             {
  557.                 stopsnd = 2;
  558.                 sleeptime = 0.1;
  559.                 goto endcam2;
  560.             }
  561.  
  562.             return;
  563.         }
  564.  
  565.         return;
  566.     }
  567.  
  568.     goto endcam1;
  569.  
  570.     return;
  571.  
  572. # ..............................................................................
  573.  
  574. blocked:
  575.  
  576.     if(getsenderref() == hook)
  577.     {
  578.         StopThing(hook);
  579.     }
  580.  
  581.     return;
  582.  
  583. # ..............................................................................
  584.  
  585. entered:
  586. if ((GetSenderRef() == landing_crate) && (GetSourceRef() == player)) 
  587.     {
  588.         SetThingCollideSize(jewelcrate, cratesize);
  589.         SetCollideType(inviso_truck, 0);
  590.         return;
  591.     }
  592. if ((GetSenderRef() == pad) && (GetSourceRef() == player)) 
  593.     {
  594.         SetThingCollideSize(jewelcrate, 0.015);
  595.         JewelFlyingStatus(1, plasma); # Enable jewel flying
  596.     }
  597.  
  598.     return;
  599.  
  600. # ..............................................................................
  601.  
  602. exited:
  603.  
  604. if ((GetSenderRef() == pad) && (GetSourceRef() == player)) 
  605.     {
  606.         JewelFlyingStatus(0, plasma); # Disable jewel flying
  607.     }
  608.  
  609.     return;
  610.  
  611. # ..............................................................................
  612.  
  613. pulse:
  614.  
  615.     if ((IsMoving(player) != 0) && (pulseon == 1)) 
  616.     {
  617.         SetCameraFOV(90, 0, 0.0); # camera 2
  618.         SetCurrentCamera(1);
  619.         ResetCameraFOV(0, 0.0);
  620.         bridgeshot = 0;
  621.         SetPulse(0.0);
  622.         pulseon = 0; # no more checking on Indy moving
  623.         prevswitch = 0; # no more switch re-activating
  624.     }
  625.  
  626.     return;
  627.  
  628. #--------------Jewel Pad--------------------------------------------------------
  629. #--------------End cameras------------------------------------------------------
  630.  
  631. endcam1:
  632.     EndCutscene();
  633.     ClearActorFlags(player, 0x200000);
  634.     active = 0;
  635.  
  636.     if (pulseon == 0 && lifted == 0)
  637.     {
  638.         # Check on Indy moving...
  639.         SetPulse(0.2);
  640.         pulseon = 1;
  641.     }
  642.  
  643.     return;
  644.  
  645. # ..............................................................................
  646.  
  647. endcam2:
  648.  
  649.     Sleep(sleeptime); # was 2.2
  650.     StopAnim(lightnum);
  651.     SetThingLight(lightpos, vecWhtLight, maxRadius, 0.5);
  652.     StopSound(mechasnd, 0);
  653.     if (stopsnd == 0)
  654.     {
  655.         PlaySoundThing(bridge_stop, bridge, 1, 10, 30, 0);
  656.     }
  657.     if (stopsnd == 1)
  658.     {
  659.         PlaySoundThing(crane_stop, crane, 1, 10, 30, 0);
  660.     }
  661.     if (stopsnd == 2)
  662.     {
  663.         PlaySoundThing(hook_stop, hook, 1, 10, 30, 0);
  664.     }
  665.     Sleep(1.0);
  666.     EndCutscene();
  667.     ClearActorFlags(player, 0x200000);
  668.     active = 0;
  669.  
  670.     if (pulseon == 0 && lifted == 0)
  671.     {
  672.         # Check on Indy moving...
  673.         SetPulse(0.2);
  674.         pulseon = 1;
  675.     }
  676.  
  677.     return;
  678.  
  679. end
  680.  
  681.